package br.com.kliptus.model.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.maverick.bean.EntityBean;

@Entity
@Table(name = "user")
public class UserJB extends EntityBean {

	private static final long serialVersionUID = 1L;
	
	private String name;
	private String userName;
	private String password;
	private UserGroupJB userGroup;
	private StatusJB status;	
	
	@Id	
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	public Long getId() {
		return this.id;
	}

	@Column(name = "name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "user_name")
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Column(name = "password")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@ManyToOne
	@JoinColumn(name = "user_group_id", referencedColumnName = "id")
	public UserGroupJB getUserGroup() {
		return userGroup;
	}

	public void setUserGroup(UserGroupJB userGroup) {
		this.userGroup = userGroup;
	}

	@ManyToOne 
	@JoinColumn(name = "status_id", referencedColumnName = "id")
	public StatusJB getStatus() {
		return status;
	}

	public void setStatus(StatusJB status) {
		this.status = status;
	}

}